package com.lq.game;

import javax.swing.*;
import java.net.URL;

/**
 * @author 李琦 on 2021/7/12.
 * @version java version "16.0.1" 2021-04-20
 * 用来获取游戏中涉及到的图片
 */
public class images {
    /*
    将图片封装为对象，通过操作对象来操作图片
     */
    public static URL bodyURL = images.class.getResource("/images/body.png");
    public static URL downURL = images.class.getResource("/images/down.png");
    public static URL foodURL = images.class.getResource("/images/food.png");
    public static URL headerURL = images.class.getResource("/images/header.png");
    public static URL leftURL = images.class.getResource("/images/left.png");
    public static URL rightURL = images.class.getResource("/images/right.png");
    public static URL upURL = images.class.getResource("/images/up.png");
    //将图片封装为一个对象
    public static ImageIcon bodyImg=new ImageIcon(bodyURL);
    public static ImageIcon downImg=new ImageIcon(downURL);
    public static ImageIcon foodImg=new ImageIcon(foodURL);
    public static ImageIcon headerImg=new ImageIcon(headerURL);
    public static ImageIcon leftImg=new ImageIcon(leftURL);
    public static ImageIcon rightImg=new ImageIcon(rightURL);
    public static ImageIcon upImg=new ImageIcon(upURL);
}
